﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace EFMySql.Models
{
    public class Blog
    {
        [Key]
        public int Id { get; set; }

        [Required]
        [MinLength(10,ErrorMessage ="不能少于10个字符")]
        public string Title { get; set; }

        [Required]
        public string Content { get; set; }



        public DateTime? Created_At { get; set; }


        public BlogCategory Category { get; set; }
    }
}